<template>
  <div>
    <el-tooltip effect="dark" content="添加" placement="top">
      <el-button
        icon="el-icon-plus"
        type="primary"
        circle
        size="mini"
        @click="$emit('add')"
      ></el-button>
    </el-tooltip>

    <el-tooltip effect="dark" content="一键选择" placement="top">
      <el-button
        icon="el-icon-edit"
        type="warning"
        circle
        size="mini"
        @click="$emit('edit')"
      ></el-button>
    </el-tooltip>

    <el-tooltip
      effect="dark"
      content="清空"
      placement="top"
      :style="{ margin: '0 10px' }"
    >
      <el-popconfirm
        confirm-button-text="好的"
        cancel-button-text="不用了"
        icon="el-icon-info"
        icon-color="red"
        title="该操作将删除该栏输入，是否确认？"
        @confirm="$emit('clear')"
      >
        <el-button
          icon="el-icon-delete"
          type="danger"
          circle
          size="mini"
          slot="reference"
        ></el-button>
      </el-popconfirm>
    </el-tooltip>
  </div>
</template>
